<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }
    html, body {
      width: 100%;
      height: 100%;
    }
    .container {
      height: 100%;
    }
    .left {
      width: 200px;
      height: 100%;
      float: left;
      margin-left: -100%;
      background: red;
    }
    .right {
      width: 120px;
      height: 100%;
      float: left;
      margin-left: -120px;
      background: green;
    }
    .middle {
      width: 100%;
      height: 100%;
      float: left;
      background: blue;
    }
    .main {
      height: 100%;
      margin: 0 120px 0 200px;
    }
  </style>
</head>
<body>
  <!-- 双飞翼布局：在圣杯布局的基础上，舍去相对定位，增加一层dom包裹 -->
  <!-- 注意：多层dom结构，增加渲染树的生成的计算量 -->
  <div class="container">
    <div class="middle">
      <div class="main">
      </div>
    </div>
    <div class="left"></div>
    <div class="right"></div>
    <button onclick="sendMsg()">发送消息</button>
  </div>
  <script>
    function sendMsg () {
      window.top.postMessage({ text: '我是子元素发出的消息' })
    }
  </script>
</body>
</html>